﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ManageTicket.Library.Control
{
    public partial class ExecuteControl : UserControl      
    {
        public ExecuteControl()
        {
            InitializeComponent();
        }

        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmBase frmBaseActive = (frmBase)this.ParentForm;
            if (!(frmBaseActive == null))
            {
                frmBaseActive.Add();
            }
        }

        private void btnEdit_Click(object sender, EventArgs e)
        {
            frmBase frmBaseActive = (frmBase)this.ParentForm;
            if (!(frmBaseActive == null))
            {
                frmBaseActive.Edit();
            }
        }

        private void btnDelete_Click(object sender, EventArgs e)
        {
            frmBase frmBaseActive = (frmBase)this.ParentForm;
            if (!(frmBaseActive == null))
            {
                frmBaseActive.Delete();
            }
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            frmBase frmBaseActive = (frmBase)this.ParentForm;
            if (!(frmBaseActive == null))
            {
                frmBaseActive.Cancel();
            }
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            frmBase frmBaseActive = (frmBase)this.ParentForm;
            if (!(frmBaseActive == null))
            {
                frmBaseActive.Save();
            }
        }

        private void btnView_Click(object sender, EventArgs e)
        {
            frmBase frmBaseActive = (frmBase)this.ParentForm;
            if (!(frmBaseActive == null))
            {
                frmBaseActive.View();
            }
        }

        private void btnFind_Click(object sender, EventArgs e)
        {
            frmBase frmBaseActive = (frmBase)this.ParentForm;
            if (!(frmBaseActive == null))
            {
                frmBaseActive.Find();
            }
        }

        private void btnExport_Click(object sender, EventArgs e)
        {
            frmBase frmBaseActive = (frmBase)this.ParentForm;
            if (!(frmBaseActive == null))
            {
                frmBaseActive.Export();
            }
        }

        private void btnSendmail_Click(object sender, EventArgs e)
        {
            frmBase frmBaseActive = (frmBase)this.ParentForm;
            if (!(frmBaseActive == null))
            {
                frmBaseActive.Sendmail();
            }
        }

        private void btnPrint_Click(object sender, EventArgs e)
        {
            frmBase frmBaseActive = (frmBase)this.ParentForm;
            if (!(frmBaseActive == null))
            {
                frmBaseActive.Print();
            }
        }

        private void btnFunction_Click(object sender, EventArgs e)
        {
            frmBase frmBaseActive = (frmBase)this.ParentForm;
            if (!(frmBaseActive == null))
            {
                frmBaseActive.Function();
            }
        }

        private void btnExit_Click(object sender, EventArgs e)
        {
            this.ParentForm.Close();
        }

        

        
    }
}
